package com.koala.jok.market;

import com.google.common.collect.Lists;
import lombok.SneakyThrows;

import java.util.List;

/**
 * 写一个超时管理系统
 *
 * @author yantingrui
 * @date 2022/9/7   15:25
 */
public class SuperMarket {
    private List<Employee> employees;
    private List<Consumer> consumers;
    private static final Integer time = 5000;

    public SuperMarket() {
        this.consumers = Lists.newLinkedList();
        this.employees = Lists.newLinkedList();
    }

    @SneakyThrows
    public void createConsumer() {
        while (true) {
            Thread.sleep(time);
            consumers.add(new Consumer());
        }
    }


    public static void main(String[] args) {

    }

}
